<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2020/8/16
  Time: 8:53
  To change this template use File | Settings | File Templates.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../../base.jsp"%>
<html>

<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>数据 - AdminLTE2定制版</title>
    <meta name="description" content="AdminLTE2定制版">
    <meta name="keywords" content="AdminLTE2定制版">
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,factory-scalable=no" name="viewport">
    <!-- 页面meta /-->
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <!-- 内容头部 -->
    <section class="content-header">
        <h1>
            基础信息
            <small>厂家信息</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="/"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="/cargo/factory/list.do">厂家列表</a></li>
        </ol>
    </section>
    <!-- 内容头部 /-->

    <!-- 正文区域 -->
    <section class="content">

        <!--订单信息-->
        <div class="panel panel-default">
            <div class="panel-heading">厂家信息</div>
            <form id="editForm" action="/cargo/factory/edit.do" method="post">
                <input type="hidden" id="id" name="id" value="${factory.id}">
                <%--<input type="hidden" id="createTime" name="createTime" value="${factory.createTime}" pattern="yyyy-MM-dd HH:mm:ss">--%>
                <%--<input type="hidden" id="updateTime" name="updateTime" value="${factory.updateTime}" pattern="yyyy-MM-dd HH:mm:ss">--%>

               <%-- <input type="hidden" id="createTime" name="createTime" value="<fmt:formatDate value='${factory.creatTime}' pattern='yyyy-MM-dd'/>">--%>
                <div class="row data-type" style="margin: 0px">
                    <div class="col-md-2 title">厂家全称</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="厂家全称" name="fullName" value="${factory.fullName}">
                    </div>
                    <div class="col-md-2 title">厂家简称</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="厂家简称" name="factoryName" value="${factory.factoryName}">
                    </div>

                    <div class="col-md-2 title">厂家类型</div>
                    <div class="col-md-4 data">
                        <select class="form-control" onchange="document.getElementById('ctype').value=this.options[this.selectedIndex].text" name="ctype">
                            <option value="">请选择</option>
                            <c:forEach items="${ctypeList}" var="item">
                                <option ${factory.ctype == item.ctype ?'selected':''} value="${item.ctype}">${item.ctype}</option>
                            </c:forEach>
                        </select>
                    </div>
                    <div class="col-md-2 title">联系人</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="联系人" name="contacts" value="${factory.contacts}">
                    </div>
                    <div class="col-md-2 title">电话</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="电话" name="phone" value="${factory.phone}">
                    </div>
                    <div class="col-md-2 title">手机</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="手机" name="mobile" value="${factory.mobile}">
                    </div>
                    <div class="col-md-2 title">传真</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="传真" name="fax" value="${factory.fax}">
                    </div>
                    <div class="col-md-2 title">地址</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="地址" name="address" value="${factory.address}">
                    </div>
                    <div class="col-md-2 title">验货员</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="验货员" name="inspector" value="${factory.inspector}">
                    </div>
                    <div class="col-md-2 title">状态</div>
                    <div class="col-md-4 data">
                        <select class="form-control select2" name="state" style="width: 100%;">
                            <option value="0" ${factory.state==0 ? 'selected':''}>未审核</option>
                            <option value="1" ${factory.state==1 ? 'selected':''}>已审核</option>
                        </select>
                        <input type="text" class="form-control" placeholder="状态" name="state" value="${factory.state}">
                    </div>
                    <div class="col-md-2 title">排序号</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="排序号" name="orderNo" value="${factory.orderNo}">
                    </div>
                    <div class="col-md-2 title">说明</div>
                    <div class="col-md-4 data">
                        <input type="text" class="form-control" placeholder="说明" name="remark" value="${factory.remark}">
                    </div>
                    <div class="box-tools text-center">
                        <button type="button" onclick='document.getElementById("editForm").submit()' class="btn bg-maroon">保存</button>
                        <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
                    </div>
                    <!--工具栏/-->

    </section>
    <!-- 正文区域 /-->

</div>
<!-- 内容区域 /-->
</body>
<script src="../../plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="../../plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<link rel="stylesheet" href="../../css/style.css">
<script>
    $('#datepicker').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
    $('#datepicker1').datepicker({
        autoclose: true,
        format: 'yyyy-mm-dd'
    });
</script>
</html>
